home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / PointReader.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  1016 b   |  42 lines

  1. ' This simple macro prompts users for the name of a datafile in the 
  2. ' DesignCAD directory, opens the file, and plots circles and text 
  3. ' labels at the XYZ points contained in the file
  4. '
  5. ' There is no error trapping for an existing filename, so be sure the
  6. ' file is under the DesignCAD directory, and don't forget the EXT(.xyz)
  7. '
  8. ' Open the Data file, (*\ denotes the DesignCAD directory).
  9.     open "i", 1, "*\Sample Macros\test.xyz"
  10. ' Read Value pairs from the file until the entire file has been read
  11.     Do while NOT EOF(1)
  12.     ' Read Placeholder text
  13.         input #1, name$
  14.     ' Read XYZ Data line
  15.         input #1, datax, datay, dataz
  16.     ' Draw Circle
  17.         >Circle4
  18.         {
  19.           <PointXYZ [datax, datay, dataz]
  20.           <Type 0
  21.           <Radius 5.0000
  22.           }
  23.     ' Draw the text Placeholder
  24.         >Text2D
  25.         {
  26.         <Style 0
  27.         <Justification 0
  28.         <Size 10
  29.         <Angle a
  30.         <Text [name$]
  31.         <type 0
  32.         <PointXYZ [datax + 5, datay, dataz]
  33.         }
  34.     Loop
  35. ' Close the Data file
  36.     Close #1
  37. ' Fit Drawing to the Window
  38.     >FitToWindow
  39.     {
  40.     }
  41. End
  42.